import "../style.less";
import React from "react";
import { FlatIconProps } from "../types";

export const SVGRate: React.FC<FlatIconProps> = ({ active, ...restProps }) => {
    return (
        <svg
            className={`${active ? "is-good" : ""}`}
            fill="none"
            height="24"
            viewBox="0 0 34 33"
            width="24"
            xmlns="http://www.w3.org/2000/svg"
            {...restProps}
        >
            {active ? (
                <path
                    className="flat-icon-fill-color"
                    d="M16.9998 0.208008L23.2294 9.32244L33.8224 12.4313L27.0783 21.1728L27.3967 32.208L16.9998 28.4962L6.60143 32.208L6.91984 21.1728L0.175781 12.4313L10.7702 9.32244L16.9998 0.208008ZM14.0516 17.1603H11.1034C11.1033 18.6986 11.7045 20.176 12.7786 21.2773C13.8526 22.3786 15.3145 23.0165 16.8524 23.055C18.3902 23.0934 19.8822 22.5294 21.0099 21.4832C22.1377 20.437 22.812 18.9915 22.8889 17.4551L22.8963 17.1603H19.948C19.9515 17.9253 19.6574 18.6617 19.1279 19.2139C18.5984 19.7662 17.875 20.0909 17.1105 20.1196C16.3459 20.1483 15.6002 19.8787 15.0308 19.3678C14.4614 18.8568 14.1129 18.1445 14.059 17.3814L14.0516 17.1603Z"
                />
            ) : (
                <path
                    className="flat-icon-fill-color"
                    d="M16.9998 0.708008L23.2294 9.82244L33.8224 12.9313L27.0783 21.6728L27.3967 32.708L16.9998 28.9962L6.60143 32.708L6.91984 21.6728L0.175781 12.9313L10.7702 9.82244L16.9998 0.708008Z"
                    fillOpacity="0.8"
                />
            )}
        </svg>
    );
};

export default SVGRate;
